{extend name="../../admin/view/main"}
{block name="button"}
<!--{if auth("talent/live")}-->
<button class='layui-btn layui-btn-sm layui-btn-primary' data-queue='{:url("talent/live")}'>同步直播</button>
<!--{/if}-->
<!--{if auth("talent/upProduct")}-->
<button class='layui-btn layui-btn-sm' data-queue='{:url("talent/upProduct")}'>同步所有直播商品</button>
<!--{/if}-->
{/block}
{block name='content'}
<div class="think-box-shadow">
    {include file='live/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-sort-td'>
                <button class="layui-btn layui-btn-xs" data-reload type="button">刷 新</button>
            </th>
            <th class="text-left nowrap">编号</th>
            <th class="text-left nowrap">达人</th>
            <th class="text-left" style="width: 150px;">达人名</th>
            <th class="text-left nowrap">直播名称</th>
            <th class="text-left nowrap">类型</th>
            <th class="text-left nowrap">状态</th>
            <th class="text-left nowrap">创建时间</th>
            <th class="text-left nowrap"></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='list-table-sort-td'>
                <label><input class="list-sort-input" data-action-blur="{:request()->url()}" data-loading="false" data-value="id#{$vo.id};action#sort;sort#{value}" value="{$vo.sort}"></label>
            </td>
            <td class="text-left nowrap">{$vo.id}</td>
            <td class="text-left">
                <div class="headimg" style="width: 50px;height: 50px;" data-tips-image data-lazy-src="{$vo.talent_head_img}"></div>
            </td>
            <td class="text-left" style="word-break: break-all;">
                <!--{if $vo.is_shop eq 1}-->
                「<span class="color-red">店播</span>」
                <!--{/if}-->
                <div>{$vo.talent_nickname}</div>
                <!--{if $vo.is_shop eq 0}-->
                {$vo.talent_appid}
                <!--{/if}-->
            </td>
            <td class="text-left nowrap">{$vo.description}
                {if $vo.type eq 0}
                <div class="color-red">{$vo.start_time|format_datetime}开播</div>
                {/if}
            </td>
            <td class="text-left nowrap">{if $vo.type eq 0}<span class="color-red">预约</span>{elseif $vo.type eq 1}<span class="color-green">直播</span>{/if}</td>
            <td class="text-left nowrap">{if $vo.live_status eq 0}<span class="color-red">结束</span>{elseif $vo.live_status eq 1}<span class="color-green">进行中</span>{/if}</td>
            <td class="text-left nowrap">{$vo.create_at}</td>
            <td class='text-left nowrap'>
                <!--{if auth("goods")}-->
                <button class='layui-btn layui-btn-sm layui-btn-primary' data-iframe="{:url('goods')}?id={$vo.talent_appid}" data-title="查看商品" data-width="900px">查看商品</button>
                <!--{/if}-->
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}